(function () {
  let myChart = echarts.init(document.querySelector(".box-m1-1"));
  let option = {
    graphic: [
      {
        type: "text",
        top: "30%",
        left: "26%",
        style: {
          text: "732",
          fill: "#fff",
          color: "#fff",
          fontSize: 20,
          fontWeight: "bold",
        },
      },
      {
        type: "text",
        top: "55%",
        left: "26.5%",
        style: {
          text: "占比74%",
          fill: "#A6A8B6",
          fontSize: 10,
          fontWeight: "normal",
        },
      },
    ],
    series: [
      {
        type: "pie",
        radius: [30, 35],
        label: {
          show: false,
        },
        data: [
          { value: 30, itemStyle: { color: "#333843" } },
          { value: 90, itemStyle: { color: "#6abaf2" } },
        ],
      },
    ],
  };

  // 步骤5：使用刚指定的配置项和数据显示图表
  myChart.setOption(option);

  // window.onresize = () => {
  //     myChart.resize()
  // }

  window.addEventListener("resize", () => {
    myChart.resize();
  });
})();
